﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;
using Silvermoon.Shapes;
using Silvermoon.Controls;
using Silvermoon.Images;

namespace Silvermoon.Windows.Styles.Metro
{
    public class MetroCheckBoxStyle : Style
    {
        public MetroCheckBoxStyle()
            : base()
        {
            Chrome = new BorderShape { BorderSize = 3, Color = PhoneColors.Dark, Opacity = 0 };
            Background = new RectangleShape { Size = Control.ScaledSize(48, 48), Color = PhoneColors.Light };
            StateManager = CheckboxStateManagers.MetroCheckBox;
            Color = PhoneColors.Light;
        }

        public override void Apply(Silvermoon.Controls.Control c)
        {
            base.Apply(c);
            CheckBox cb = c as CheckBox;
            cb.CheckShape = new ImageShape { Image = SysImages.Check, Size = Control.ScaledSize(48, 48), UseTextColor = false, Color = PhoneColors.Dark };
        }
    }
}
